﻿#pragma once
#include "AsGraphicsBasics.h"
#include "AsGraphicsItem.h"
#include <QSemaphore>
#include <QMutex>

__AS_JY(Update 2023.2.24)
class AS_GRAPHICS_API AsGraphicsImageItem : public AsGraphicsItem {
public:
	explicit AsGraphicsImageItem(QGraphicsItem *parent = nullptr);
	AsGraphicsImageItem(const QImage& image, QGraphicsItem *parent = nullptr);
	virtual ~AsGraphicsImageItem();

private:
	QImage mImage;
	bool mbSmoothTransformation;

protected:
	void paint(QPainter* painter) override;

public:
	void setImage(QImage image);
	QImage image();
	QImage& imageRef();

public:
	void setEnable_SmoothTransformation(bool isEnable = true);

};

namespace AsGraphicsNamespace {
	typedef AsGraphicsImageItem ImageItem;
};

